int check_calib(void)
{
  
  TFile *fOpen = new TFile("AttenuationTGraph.root","READ");
  TGraph *tgR4 = (TGraph*)fOpen->Get("File_R4");

  // TFile *fOpen_CableL5 = new TFile("plots/File_L5.root","READ");
  TGraph *tgL5 = (TGraph*)fOpen->Get("File_L5");

  //TFile *fOpen_AMP41 = new TFile("plots/AMP41.root","READ");
  TGraph *tgAMP41 = (TGraph*)fOpen->Get("AMP41");

  TFile *fOpen_L5R4AMP41 = new TFile("L5R4AMP41.root","READ");
  TGraph *tgL5R4AMP41 = (TGraph*)fOpen_L5R4AMP41->Get("L5R4AMP41");

  //cout << tgAMP41->GetN() << "\t" << tgL5->GetN() << "\t" << tgR4->GetN() < endl;

  TGraph * tgTotal = new TGraph();
  for(int i=0;i<tgAMP41->GetN();++i)
    {
    
      double freq, att_cable1;
      tgR4->GetPoint(i,freq,att_cable1);
      
      double dummy_freq, att_cable2;
      tgL5->GetPoint(i,dummy_freq,att_cable2);
      
       double att_amp;
       tgAMP41->GetPoint(i,dummy_freq,att_amp);

       double tot_att = att_cable1 + att_cable2 + att_amp;


       tgTotal->SetPoint(i,freq,tot_att);


    }


  TCanvas *c1 = new TCanvas("c1","",800,800);
  tgL5R4AMP41->Draw("al");
  tgL5R4AMP41->SetLineColor(2);

tgTotal->Draw("l");


  return 0;

}
